﻿using Microsoft.EntityFrameworkCore.Internal;

namespace EFCoreTests.App
{
    public abstract class EFTest<TTest>
        where TTest : EFTest<TTest>
    {
        public string SqlserverConnString => $"Server=8.137.37.156,39001;Database={GetType().Name};Uid=sa;Pwd=Abc123!@#;Encrypt=False;TrustServerCertificate=False;pooling=true;";
        public string MysqlConnString => $"Server=localhost;port=3306;Database={GetType().Name};uid=root;pwd=Abc123!@#;";

        public EFTest()
        {

        }

        public abstract Type[] GetEntityTypes();

        public virtual async Task SeedAsync(DbContextBase<TTest> db)
        {
            await Task.CompletedTask;
        }

        public virtual async Task DoAsync()
        {
            //var db = new DbContextBase<TTest>(this, DatabaseType.Sqlserver);
            await Task.CompletedTask;
        }
    }
}
